/*
Tailwind CSS Preflight - 基础样式重置
防止内边距和边框影响元素宽度
允许通过添加边框宽度来为元素添加边框
*/

/* 全局盒模型和边框重置 */
*,
::before,
::after {
  border-color: theme('borderColor.DEFAULT', currentColor);
  border-style: solid;
  border-width: 0;
  box-sizing: border-box;
}

::before,
::after {
  --tw-content: '';
}

/* HTML和宿主元素基础设置 */
html,
:host {
  -moz-tab-size: 4;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
  line-height: 1.5;
  tab-size: 4;
}

/* Body元素重置 */
body {
  line-height: inherit;
  margin: 0;
}

/* 文本元素重置 */
hr {
  border-top-width: 1px;
  color: inherit;
  height: 0;
}

abbr:where([title]) {
  text-decoration: underline dotted;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

a {
  color: inherit;
  text-decoration: inherit;
}

b,
strong {
  font-weight: bolder;
}

code,
kbd,
samp,
pre {
  font-family: theme('fontFamily.mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
  font-size: 1em;
}

small {
  font-size: 80%;
}

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/* 表格元素重置 */
table {
  border-collapse: collapse;
  border-color: inherit;
  text-indent: 0;
}

/* 表单元素重置 */
button,
input,
optgroup,
select,
textarea {
  color: inherit;
  font-family: inherit;
  font-feature-settings: inherit;
  font-size: 100%;
  font-variation-settings: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  margin: 0;
  padding: 0;
}

button,
select {
  text-transform: none;
}

button {
  -webkit-appearance: button;
  background-color: transparent;
  background-image: none;
}

/* 焦点样式 */
:-moz-focusring {
  outline: auto;
}

:-moz-ui-invalid {
  box-shadow: none;
}

/* 进度条和输入控件 */
progress {
  vertical-align: baseline;
}

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

[type='search'] {
  -webkit-appearance: textfield;
  outline-offset: -2px;
}

::-webkit-search-decoration {
  -webkit-appearance: none;
}

::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}

/* 列表和块级元素 */
summary {
  display: list-item;
}

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

dialog {
  padding: 0;
}

/* 文本区域和占位符 */
textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: theme('colors.gray.400', #9ca3af);
  opacity: 1;
}

/* 光标样式 */
button,
[role="button"] {
  cursor: pointer;
}

:disabled {
  cursor: default;
}

/* 媒体和替换元素 */
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  vertical-align: middle;
}

img,
video {
  height: auto;
  max-width: 100%;
}

/* 隐藏元素 */
[hidden] {
  display: none;
}